<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
  <title>Test Case for Issue #2739</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>

<h1>Issue #2739</h1>

<p>This test-case is intended for <a href="http://code.google.com/p/fbug/issues/detail?id=2739">Issue #2739</a>
- <span class="h3">Net Response tab incorrect</span>.
<br/>
<i>Jan Odvarko, odvarko@gmail.com</i>
</p>

<ol>
<li>Open Firebug and enable the Net panel.</li>
<li>Click on the <code style="color:green">Execute Test</code> button below.</li>
<li>Two XHRs are executed</li>
<li>Open them both in the Net panel and verify the responses. It should be:<br/>
issue2739.php#start: <code style="color:green">Response for test 2739:start</code><br/>
issue2739.php#link: <code style="color:green">Response for test 2739:link</code><br/>
</li>
</ol>

<button id="testButton" onclick="onExecuteTest()">Execute Test</button>

<script type="text/javascript">
function onExecuteTest()
{
    var request = new XMLHttpRequest();
    request.open("POST", "issue2739.php#start", true);
    request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

    request.onreadystatechange = function()
    {
        if (request.readyState == 4 && request.status == 200)
        {
            var request2 = new XMLHttpRequest();
            request2.open("POST", "issue2739.php#link", true);
            request2.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
            request2.send("data=link");
        }
    }

    request.send("data=start");
}
</script>

</body>
</html>
